package com.yilin.tms.core.entity.data.insurance;


import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yilin.tms.core.commons.base.BaseDataEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

@Entity
@Table(name = "data_invoice_order")
@TableName("data_invoice_order")
public class InsuranceOder extends BaseDataEntity {

    public enum InsuranceStatus{
        create(0,"保单已创建"),
        insure(1,"保单生效中"),
        indemnity(2,"保单理赔中"),
        end(3,"保单已结束");
        @EnumValue
        public Integer index;
        public String name;
        InsuranceStatus(Integer index, String name) {
            this.index = index;
            this.name = name;
        }
    }

    @Column(name = "transport_no")
    private String  transportNo;//运单号
    @Column(name = "shipper_name")
    private String shipperName;//货主名称
    @Column(name = "truck_user_name")
    private String  truckUserName;//司机名称
    @Column(name = "truck_type_name")
    private String truckTypeName;//车辆类型
    @Column(name = "truck_load_weight")
    private Double truckLoadWeight;//车辆载重
    @Column(name = "truck_transform_no")
    private String truckTransformNo;//车辆准运证号
    @Column(name = "truck_no")
    private String truckNo;//车牌号
    @Column(name = "trailer_no")
    private String trailerNo;//车挂牌号
    @Column(name = "goods_type_name")
    private String goodsTypeName;//货物类型
    @Column(name = "insurance_amount")
    private Double insuranceAmount;//货物价值
    @Column(name = "insurance_money")
    private Double insuranceMoney;//保费
    @Column(name = "delivery_time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date deliveryTime;//发货时间
    @Column(name = "delivery_address")
    private String deliveryAddress;//发货地点
    @Column(name = "consignee_time")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date consigneeTime ;//收货时间
    @Column(name = "consignee_address")
    private String consigneeAddress;//收货地点
    @Column(name = "map_kilometer")
    private Double mapKilometer;//里程
    @Column(name = "truck_state")
    private String truckState;//车辆状态
    @Column(name = "insurance_state")
    private InsuranceStatus insuranceState;//是否上保
    @Column(name = "insurance_url")
    private String insuranceUrl;//用户上传保单URL地址

    public String getTransportNo() {
        return transportNo;
    }

    public void setTransportNo(String transportNo) {
        this.transportNo = transportNo;
    }

    public String getShipperName() {
        return shipperName;
    }

    public void setShipperName(String shipperName) {
        this.shipperName = shipperName;
    }

    public String getTruckUserName() {
        return truckUserName;
    }

    public void setTruckUserName(String truckUserName) {
        this.truckUserName = truckUserName;
    }

    public String getTruckTypeName() {
        return truckTypeName;
    }

    public void setTruckTypeName(String truckTypeName) {
        this.truckTypeName = truckTypeName;
    }

    public Double getTruckLoadWeight() {
        return truckLoadWeight;
    }

    public void setTruckLoadWeight(Double truckLoadWeight) {
        this.truckLoadWeight = truckLoadWeight;
    }

    public String getTruckTransformNo() {
        return truckTransformNo;
    }

    public void setTruckTransformNo(String truckTransformNo) {
        this.truckTransformNo = truckTransformNo;
    }

    public String getTruckNo() {
        return truckNo;
    }

    public void setTruckNo(String truckNo) {
        this.truckNo = truckNo;
    }

    public String getTrailerNo() {
        return trailerNo;
    }

    public void setTrailerNo(String trailerNo) {
        this.trailerNo = trailerNo;
    }

    public String getGoodsTypeName() {
        return goodsTypeName;
    }

    public void setGoodsTypeName(String goodsTypeName) {
        this.goodsTypeName = goodsTypeName;
    }

    public Double getInsuranceAmount() {
        return insuranceAmount;
    }

    public void setInsuranceAmount(Double insuranceAmount) {
        this.insuranceAmount = insuranceAmount;
    }

    public Double getInsuranceMoney() {
        return insuranceMoney;
    }

    public void setInsuranceMoney(Double insuranceMoney) {
        this.insuranceMoney = insuranceMoney;
    }

    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public String getDeliveryAddress() {
        return deliveryAddress;
    }

    public void setDeliveryAddress(String deliveryAddress) {
        this.deliveryAddress = deliveryAddress;
    }

    public Date getConsigneeTime() {
        return consigneeTime;
    }

    public void setConsigneeTime(Date consigneeTime) {
        this.consigneeTime = consigneeTime;
    }

    public String getConsigneeAddress() {
        return consigneeAddress;
    }

    public void setConsigneeAddress(String consigneeAddress) {
        this.consigneeAddress = consigneeAddress;
    }

    public Double getMapKilometer() {
        return mapKilometer;
    }

    public void setMapKilometer(Double mapKilometer) {
        this.mapKilometer = mapKilometer;
    }

    public String getTruckState() {
        return truckState;
    }

    public void setTruckState(String truckState) {
        this.truckState = truckState;
    }

    public InsuranceStatus getInsuranceState() {
        return insuranceState;
    }

    public void setInsuranceState(InsuranceStatus insuranceState) {
        this.insuranceState = insuranceState;
    }

    public String getInsuranceUrl() {
        return insuranceUrl;
    }

    public void setInsuranceUrl(String insuranceUrl) {
        this.insuranceUrl = insuranceUrl;
    }
}
